package com.xiran.srpingboottemplateself.common;

import com.xiran.srpingboottemplateself.exception.BaseExceptionInterface;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

/**
 * 响应状态码枚举类
 * 统一管理系统中所有接口的响应状态码和描述信息
 */

@AllArgsConstructor
@Getter
public enum ResponseCodeEnum implements BaseExceptionInterface {

    // ----------- 通用异常状态码 -----------
    SYSTEM_ERROR("10000", "出错啦，后台小哥正在努力修复中..."),

    // ----------- 业务异常状态码 -----------
    PRODUCT_NOT_FOUND("20000", "该产品不存在（测试使用）"),
    PARAM_NOT_VALID("10001", "参数错误"),


    LOGIN_FAIL("40003", "登录失败"),
    USERNAME_OR_PWD_ERROR("20001", "用户名或密码错误"), TOKEN_INVALID("40002","Token失效，请重新登录" ), USER_NOT_EXIST("40001","用户不存在" ), UNAUTHORIZED("40001", "未经授权" ), FORBIDDEN("40003","权限不足，禁止访问" );



    private String  errorCode;

    private String errorMessage;


}